<template>
    <div class="pagination" v-if="data">
        <div>显示第 {{data.Offset + 1}} 到第 {{(data.Offset + 10) > data.Total ? data.Total : (data.Offset + 10)}} 条记录，总共 {{data.Total}} 条记录</div>
        <el-pagination
            v-loading.fullscreen.lock="fullscreenLoading"
            @current-change="currentChange"
            background
            :total="data.Total"
            layout="prev, pager, next"
            >
        </el-pagination>
    </div>
</template>

<script>
    export default {
        props: ['data'],
        watch: {
            data(old, new2) {
                this.fullscreenLoading = false;
            },
        },
        data() {
            return {
                fullscreenLoading: false,
            }
        },
        methods: {
            currentChange(e) {
                this.fullscreenLoading = true;
                this.$emit('currentChange', e)
            },
        },
    }
</script>

<style lang="scss" scoped>

</style>